<?php require APP_ROOT.'public/head.php';if(session('member')=='')
{
    goto_url('index.php?m=member&a=login');
}?>
<link href="css/chunk-39e464d4.fe98bb94.css"   rel="stylesheet" type="text/css" >
<link href="css/chunk-491135e0.e4e21132.css"   rel="stylesheet" type="text/css" >
<link href="css/chunk-48278484.09740d76.css"   rel="stylesheet" type="text/css" >
<link href="css/chunk-00e58765.804a9efe.css"  rel="stylesheet" type="text/css" >
<div class="page">
    <?php require APP_ROOT.'public/top.php';?>
    <!-- is-opened  is-active-->
    <div class="home_kf">
        <p>微信客服
            <img src="images/kf.jpg" alt="" class="home_kf_code">
        </p>
    </div>
    <style>
        .home_kf_code{display: none;}
        .home_kf:hover .home_kf_code{display: block;}
    </style>
    <div class="page_body body_user">
        <div class="user_page page_body_content">
            <?php require APP_ROOT.'public/left.php';?>
            <div class="user_page_right">
                <div class="user_page_right_head">
                    <div class="user_block">
                        <div class="user_block_photo">
                            <img src="" alt="" />
                            <span class="user_change_password">修改密码</span>
                        </div>
                        <div class="user_block_finance">
                            <p>余额 <span class="user_block_finance_but">充值</span>
                                <!----></p>
                            <p><span class="user_block_finance_value"><?php echo $member['yuqian']; ?></span> 元 <em class="user_block_finance_refresh"><i class="el-icon-refresh"></i></em></p>
                            <!---->
                        </div>
                    </div>
                    <div class="goto_shop">
                        <img src="" alt="" />
                        <a href="?m=order&a=zenjia&shu=2">现在就去发货</a>
                    </div>
                </div>
<?php
$gt_date=pg('gt_date');
$lt_date=pg('lt_date');
$zuixe=strtotime($gt_date);
$zuide=strtotime($lt_date);
$chonzhi_price=pg('chonzhi_price');

?>
                <div class="recharge_log">
                    <div class="recharge_log_form">
                        <form action="?m=member&a=chongzhi&shu=3&ho=2" method="post" enctype="multipart/form-data" id="huiosa">
                        <div class="table_form_item">
                            <div class="el-date-editor el-input el-input--small el-input--prefix el-input--suffix el-date-editor--date">
                                <!---->
                                <input type="text" autocomplete="off"  name="gt_date" style="height: 32px;line-height: 32px;border:1px solid #c0c4cc;"  class="laydate-input" onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})" placeholder="选择日期时间" class="el-input__inner"  value="<?php echo $gt_date; ?>"/>

                            </div> 至
                            <div class="el-date-editor el-input el-input--small el-input--prefix el-input--suffix el-date-editor--date">
                                <!---->
                                <input type="text" autocomplete="off"  name="lt_date" style="width: 150px;height: 32px;line-height: 32px;border:1px solid #c0c4cc;"  class="laydate-input" onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})" placeholder="选择日期时间" class="el-input__inner"  value="<?php echo $lt_date; ?>"/>
                            </div>
                        </div>
                        <div class="recharge_log_form_search el-input el-input--small el-input-group el-input-group--append el-input--suffix">
                            <!---->
                            <input type="text" name="chonzhi_price" autocomplete="off" placeholder="请输入关键词" class="el-input__inner" value="<?php echo $chonzhi_price; ?>"/>
                            <!---->
                            <!---->
                            <div class="el-input-group__append">
                                <button type="button" class="el-button el-button--default shaixuans">
                                    <!----><i class="el-icon-search"></i><span>搜索</span></button>
                            </div>
                            <!---->
                        </div>
                        </form>
                    </div>
                    <script>
                        $('.shaixuans').click(function(){
                            $('#huiosa').submit();
                        });
                    </script>
                    <div class="recharge_log_table">
                        <div class="el-table el-table--fit" style="width: 100%;">
                            <div class="hidden-columns">
                                <div></div>
                                <div></div>
                                <div></div>
                                <div></div>
                            </div>
                            <div class="el-table__header-wrapper">
                                <table cellspacing="0" cellpadding="0" border="0" class="el-table__header" style="width: 1050px;">
                                    <colgroup>
                                        <col name="el-table_5_column_27" width="100" />
                                        <col name="el-table_5_column_28" width="117" />
                                        <col name="el-table_5_column_28" width="150" />
                                        <col name="el-table_5_column_29" width="100" />
                                        <col name="el-table_5_column_30" width="573" />
                                        <col name="gutter" width="0" />
                                    </colgroup>
                                    <thead class="has-gutter">
                                    <tr class="">
                                        <th colspan="1" rowspan="1" class="  is-left is-leaf">
                                            <div class="cell">
                                                id
                                            </div></th>
                                        <th colspan="1" rowspan="1" class="  is-right   is-leaf">
                                            <div class="cell">
                                                充值金额
                                            </div></th>
                                        <th colspan="1" rowspan="1" class="  is-right   is-leaf">
                                            <div class="cell">
                                                状态
                                            </div></th>
                                        <th colspan="1" rowspan="1" class="  is-left   is-leaf">
                                            <div class="cell">
                                                交易时间
                                            </div></th>
                                        <th colspan="1" rowspan="1" class="  is-left   is-leaf">
                                            <div class="cell">
                                                备注
                                            </div></th>
                                        <th class="gutter" style="width: 0px; display: none;"></th>
                                    </tr>
<?php
$perpage=10;$offset=($p-1)*$perpage;
$where['member_id']=$member['member_id'];
if($chonzhi_price){
    $where['chonzhi_price']=$chonzhi_price;
}

if($zuixe!='' && $zuide!=''){
    $where['date']  = array('between',array($zuixe,$zuide));
}elseif($zuixe!='' && $zuide==''){
    $where['date']  = array('gt',$zuixe);
}elseif($zuixe=='' && $zuide!=''){
    $where['date']  = array('lt',$zuide);
}
$chonzhi = M('chonzhi')->where($where)->order('date desc')->limit($offset,$perpage)->select();
//echo M()->getlastsql();
//dump($chonzhi);
$total_num=M('chonzhi')->where($where)->count(); ?>
<?php if($chonzhi){ ?>
 <?php  foreach($chonzhi as $k=>$v){ ?>
                                    <tr class="">
                                        <td colspan="1" rowspan="1" class="  is-left is-leaf">
                                            <div class="cell">
                                                <?php echo $v['chonzhi_id'];?>
                                            </div></td>
                                        <td colspan="1" rowspan="1" class="  is-right   is-leaf">
                                            <div class="cell">
                                                <?php echo $v['chonzhi_price'];?>
                                            </div></td>
                                        <td colspan="1" rowspan="1" class="  is-right   is-leaf">
                                            <div class="cell">
                                                <?php echo M('input')->where(array('input_pid'=>535,'input_value'=>$v['state']))->getField('input_name');?>
                                            </div></td>
                                        <td colspan="1" rowspan="1" class="  is-left   is-leaf">
                                            <div class="cell">
                                                <?php echo date('Y-m-d',$v['date']);?>
                                            </div></td>
                                        <td colspan="1" rowspan="1" class="  is-left   is-leaf">
                                            <div class="cell">
                                                <?php echo $v['chonzhi_intro'];?>
                                            </div></td>
                                        <td class="gutter" style="width: 0px; display: none;"></td>
                                    </tr>
<?php } ?>
<?php }else{ ?>
                                    <tr class="">
                                        <td colspan="4" rowspan="1" class=" is-left is-leaf">
                                            <div class="cell" style="width: 100%;text-align: center;">
                                                暂无数据
                                            </div>
                                        </td>
                                    </tr>
<?php } ?>
                                    </thead>
                                </table>
                            </div>

                        </div>
                        <div class="table_pagination el-pagination">
                            <?php require APP_ROOT.'public/page.php';?>
                        </div>
                    </div>
                </div>
        </div>
    </div>

</div>
<?php require APP_ROOT.'public/bottom.php';?>
